<?php
/*
# ------------------------------------------------------------------------
# JA Seleni for Joomla 1.5.x - Version 1.0 - Licence Owner JA115884
# ------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: J.O.O.M Solutions Co., Ltd
# Websites:  http://www.joomlart.com -  http://www.joomlancers.com
# This file may not be redistributed in whole or significant part.
# ------------------------------------------------------------------------
*/

defined('_JEXEC') or die('Restricted access');
/* This template for headline (frontpage): first news with big image and next news with smaller images
bigimg_w, bigimg_h, smallimg_w, smallimg_h
*/
$showhlreadmore 				= 	intval (trim( $params->get( 'showhlreadmore', 0 ) ));
$hiddenClasses 				= 	trim( $params->get( 'hiddenClasses', '' ) );
$i = 0;
?>
<div id="ja-zinfpwrap">
<div id="ja-zinfp" class="clearfix">

	<div class="ja-zinfp-featured column clearfix">
	<?php foreach ($rows as $news) :
	$pos = ($i==0 || $i==$bigitems)?'first':(($i==count($rows)-1 || $i==$bigitems-1)?'last':'');
	if($i<$bigitems) :
		$link   = JRoute::_(ContentHelperRoute::getArticleRoute($news->slug, $news->catslug, $news->sectionid));
		$image = modJANewsHelperFP::replaceImage ($news, $imgalign, 1, $bigmaxchar, $bigshowimage, $bigimg_w, $bigimg_h, $hiddenClasses);
	  //First new
	?>
		<div class="ja-zincontent inner clearfix <?php echo $pos;?>">
			<?php echo $image; ?>
			<h4 class="ja-zintitle"><a href="<?php echo $link;?>" title="<?php echo strip_tags($news->title); ?>"><?php echo $news->title;?></a></h4>
			<?php echo $bigmaxchar?$news->introtext1:$news->introtext;?>
			<?php if ($showhlreadmore) {?>
			<a href="<?php echo $link;?>" class="readon"><span><?php echo JText::_('READ MORE...');?></span></a>
			<?php } ?>
		</div>
	<?php if($i==$bigitems-1):?>
	</div>

	<div class="ja-zinfp-normal column clearfix">
	<?php endif;?>
	<?php else: ?>
	<?php
		$link   = JRoute::_(ContentHelperRoute::getArticleRoute($news->slug, $news->catslug, $news->sectionid));
		$image = modJANewsHelperFP::replaceImage ($news, $imgalign, 1, $smallmaxchar, $smallshowimage, $smallimg_w, $smallimg_h, $hiddenClasses);
	  //Next news
	?>
		<div class="ja-zincontent inner clearfix <?php echo $pos;?>">
			<?php echo $image; ?>
			<h4 class="ja-zintitle"><a href="<?php echo $link;?>" title="<?php echo strip_tags($news->title); ?>"><?php echo $news->title;?></a></h4>
			<?php echo $smallmaxchar?$news->introtext1:$news->introtext;?>
		</div>
	<?php
	endif;
	++$i;
	endforeach;?>
	</div>

</div>
</div>
